package ${package.Mapper}

import com.lgl.enums.status.StatusEnum
import com.lgl.enums.status.YesNo
import ${package.Entity}.${entity}
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import org.apache.ibatis.annotations.Update
import tk.mybatis.mapper.common.Mapper

/**
 * <p>
 * ${table.comment!} Mapper 接口
 * </p>
 *
 * @author ${author}
 */
<#if kotlin>
interface ${table.mapperName} : Mapper<${entity}> {

    @Select("select * from ${table.name} where status = ${r'#{status}'}")
    fun getValues(status: YesNo): List<${entity}>

    @Update("update ${table.name} set status = ${r'#{update}'} where id = ${r'#{driverId}'} and status = ${r'#{status}'}")
    fun updateValue(driverId: Long, status: StatusEnum, update: StatusEnum): Int

    fun getList(@Param("value") value: ${entity}): List<${entity}>

    @Update("update ${table.name} set status = ${r'#{status}'} where idx = ${r'#{id}'}")
    fun del(@Param("idx") id: Long, @Param("status") status: StatusEnum)

}
<#else>
public interface ${table.mapperName} extends Mapper<${entity}> {

}
</#if>
